

// saving all
for(var i=0;i<fl.documents.length;i++){
	fl.setActiveWindow(fl.documents[i]);
	var doc = fl.getDocumentDOM();
	doc.save();
}

//var theIndex = fl.findDocumentIndex("Application.fla");
//fl.setActiveWindow(fl.documents[theIndex]);
var doc = fl.getDocumentDOM();

if (doc == null)
{
   fl.trace("No documents open");
}
else
{
   doc.save();
   doc.testMovie();
}
